// 全局混入

// 仅一行显示
@mixin one-line() {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
// 指定行数显示
@mixin multi-line($line: 2) {
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: $line;
	-webkit-box-orient: vertical;
}

// 防止scroll导致宽度抖动
@mixin prevent-scroll-jitter() {
	padding-left: calc(100vw - 100%);
}

// 禁止选中
@mixin no-select() {
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

// 骨架动画
@mixin skeleton-animation() {
	background-image: linear-gradient(
		90deg,
		var(--jj-skeleton-line-bg1),
		var(--jj-skeleton-line-bg2),
		var(--jj-skeleton-line-bg1)
	);
	background-size: 480px 480px;
	animation: article-skeleton-animation 0.6s linear infinite;
}

@keyframes article-skeleton-animation {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 480px 0;
	}
}
